import request from '../utils/request'

/**
 * 立即预约
 * @param {*} obj 
 * @returns 
 */
export const add_appointment = (obj) => {
    return request({
        url: "/api/Appointment/Add_Appointment",
        method: "POST",
        data: obj,
        headers: {
            'Content-Type': 'application/json'  
        }
    })
}

/**
 * 根据套餐ID查询套餐下的所有产品
 * @param {*} id 
 * @returns 
 */
export const get_products = (id) => {
    return request({
        url: "/api/Product/Get_Products",
        method: "POST",
        params: { id: id }
    })
}

/**
 * 获取所有的产品套餐
 * @returns 
 */
export const get_all_product_package = ({ }) => {
    return request({
        url: "/api/Product/Get_All_Product_Package",
        method: "GET"
    })
}
/**
 * 获取单个产品套餐
 * @param {*} param0 
 * @returns 
 */
export const get_single_product_package = (id) => {
    return request({
        url: "/api/Product/Get_Single_Product_Package",
        method: "POST",
        params: { id: id }
    })
}